import BScroll from "better-scroll";
function betterScrollHorizontal(that,wrapper,content,num, itemWidth) {
    content.style.width = num * itemWidth + "rem";
    that.$nextTick(() => {
            //wrapper为template中容器的ref，表示给那个元素来设置滚动
            that.scroll = new BScroll(wrapper,{
                scrollY: false,  //关闭纵向滚动
                scrollX: true,  //横向滚动
                startX: 0,  //横向滚动的开始位置
                click: true,  //允许click事件
            });
        })
    }
export {betterScrollHorizontal}